3.1 \(\int (a+i a \cot (c+d x))^n \, dx\)

Optimal. Leaf size=49 \[ \frac{i (a+i a \cot (c+d x))^n \text{Hypergeometric2F1}\left (1,n,n+1,\frac{1}{2} (1+i \cot (c+d x))\right )}{2 d n} \]

[Out]

((I/2)*(a + I*a*Cot[c + d*x])^n*Hypergeometric2F1[1, n, 1 + n, (1 + I*Cot[c + d*x])/2])/(d*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0279005, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {3481, 68} \[ \frac{i (a+i a \cot (c+d x))^n \, _2F_1\left (1,n;n+1;\frac{1}{2} (i \cot (c+d x)+1)\right )}{2 d n} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Cot[c + d*x])^n,x]

[Out]

((I/2)*(a + I*a*Cot[c + d*x])^n*Hypergeometric2F1[1, n, 1 + n, (1 + I*Cot[c + d*x])/2])/(d*n)

Rule 3481

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Dist[b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rubi steps

\begin{align*} \int (a+i a \cot (c+d x))^n \, dx &=\frac{(i a) \operatorname{Subst}\left (\int \frac{(a+x)^{-1+n}}{a-x} \, dx,x,i a \cot (c+d x)\right )}{d}\\ &=\frac{i (a+i a \cot (c+d x))^n \, _2F_1\left (1,n;1+n;\frac{1}{2} (1+i \cot (c+d x))\right )}{2 d n}\\ \end{align*}

Mathematica [B]  time = 0.307475, size = 117, normalized size = 2.39 \[ \frac{i (a+i a \cot (c+d x))^n \left (2 (n+1) \text{Hypergeometric2F1}(1,n,n+1,1+i \cot (c+d x))+(n+i n \cot (c+d x)) \left (\text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{1}{2} (1+i \cot (c+d x))\right )-2 \text{Hypergeometric2F1}(1,n+1,n+2,1+i \cot (c+d x))\right )\right )}{4 d n (n+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Cot[c + d*x])^n,x]

[Out]

((I/4)*(a + I*a*Cot[c + d*x])^n*(2*(1 + n)*Hypergeometric2F1[1, n, 1 + n, 1 + I*Cot[c + d*x]] + (n + I*n*Cot[c
 + d*x])*(Hypergeometric2F1[1, 1 + n, 2 + n, (1 + I*Cot[c + d*x])/2] - 2*Hypergeometric2F1[1, 1 + n, 2 + n, 1
+ I*Cot[c + d*x]])))/(d*n*(1 + n))

________________________________________________________________________________________

Maple [F]  time = 0.388, size = 0, normalized size = 0. \begin{align*} \int \left ( a+ia\cot \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*cot(d*x+c))^n,x)

[Out]

int((a+I*a*cot(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \cot \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((I*a*cot(d*x + c) + a)^n, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\left (-\frac{2 \, a}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}\right )^{n}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((-2*a/(e^(2*I*d*x + 2*I*c) - 1))^n, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (i a \cot{\left (c + d x \right )} + a\right )^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))**n,x)

[Out]

Integral((I*a*cot(c + d*x) + a)**n, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \cot \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((I*a*cot(d*x + c) + a)^n, x)